﻿using UnityEngine;
using System.Collections;
using UniLua;

namespace TCG.FFI
{
	public static class UnityBehaviourLib 
	{
		public static string LIB_NAME = "UnityBehaviourLib";

		public static string ParentLibName = "UnityComponentLib";

		public static int mf_IsEnabled (ILuaState luaState)
		{
			Behaviour behaviour = LuaTools.L_CheckUData (luaState, 1, LIB_NAME) as Behaviour;
			luaState.PushBoolean (behaviour.enabled);
			return 1;
		}

		public static int mf_SetEnabled (ILuaState luaState)
		{
			Behaviour behaviour = LuaTools.L_CheckUData (luaState, 1, LIB_NAME) as Behaviour;
			behaviour.enabled = luaState.ToBoolean (2);
			return 0;
		}
	}
}
